import request from "@/utils/request";

// 查询门店配置(CU通用配置)
export function Checkcurrency(query) {
  return request({
    url: "/store/conf/query/currency",
    method: "post",
    params: query,
  });
}

// 获取角色精简信息列表
export function getRoleList(query) {
  return request({
    url: "/system/role/list-all-simple",
    method: "get",
    params: query,
  });
}

// 创建更新门店配置(CU通用配置)
export function CreateCurrency(data) {
  return request({
    url: "/store/conf/create/currency",
    method: "post",
    data: data,
  });
}

// // 创建房间设置
// export function CreateRoomSet(data) {
//   return request({
//     url: "/store/room-setting/create",
//     method: "post",
//     data: data,
//   });
// }

// 获得门店配置分页(RU:充值规则)
export function getRechargeRules(query) {
  return request({
    url: "/store/conf/page/rules",
    method: "get",
    params: query,
  });
}

// 创建门店配置(RU:充值规则)
export function CreateRechargeRules(data) {
  return request({
    url: "/store/conf/create/rules",
    method: "POST",
    data: data,
  });
}

// 更新门店配置(RU:充值规则)
export function UpdateRechargeRules(data) {
  return request({
    url: "/store/conf/update/rules",
    method: "PUT",
    data: data,
  });
}

// 根据配置标识查询门店
export function getStoresList(query) {
  return request({
    url: "/store/conf/store",
    method: "get",
    params: query,
  });
}

// 获得门店配置
export function getStoresInfo(query) {
  return request({
    url: "/store/conf/get",
    method: "get",
    params: query,
  });
}

// 删除门店配置
export function DeleteStores(data) {
  return request({
    url: "/store/conf/delete",
    method: "DELETE",
    params: data,
  });
}

// 获得门店配置分页(RC:充值提成;HO:待客提成;VI:约客提成)
export function getStoresPage(query) {
  return request({
    url: "/store/conf/page",
    method: "get",
    params: query,
  });
}

// 创建门店配置(RC:充值提成;HO:待客提成;VI:约客提成)
export function CreateStoresSet(data) {
  return request({
    url: "/store/conf/create",
    method: "POST",
    data: data,
  });
}

// 更新门店配置(RC:充值提成;HO:待客提成;VI:约客提成)
export function UpdateStoresSet(data) {
  return request({
    url: "/store/conf/update",
    method: "PUT",
    data: data,
  });
}

// 查询项目提成
export function getProjectCommission(query) {
  return request({
    url: "/store/conf/query/project",
    method: "POST",
    params: query,
  });
}

// 创建项目提成配置
export function CreateProjectCommission(data) {
  return request({
    url: "/store/conf/create/project",
    method: "POST",
    data: data,
  });
}

// 分页获取业绩提成
export function getAchievementCom(query) {
  return request({
    url: "/store/conf/page/pc",
    method: "get",
    params: query,
  });
}

// 创建业绩提成
export function CreateAchievementCom(data) {
  return request({
    url: "/store/conf/create/pc",
    method: "POST",
    data: data,
  });
}

// 修改业绩提成
export function UpdateAchievementCom(data) {
  return request({
    url: "/store/conf/update/pc",
    method: "PUT",
    data: data,
  });
}

// 删除业绩提成
export function DeleteAchievementCom(data) {
  return request({
    url: "/store/conf/delete",
    method: "DELETE",
    params: data,
  });
}

// 用户
export function getUerAllList(params) {
  return request({
    url: "/system/user/list-by-instatus",
    method: "get",
    params: params,
  });
}

// 禁用/启用充值规则
export function ConfAvl(data) {
  return request({
    url: "/store/conf/avl",
    method: "POST",
    data: data,
  });
}

// 档位配置新增
export function createGear(data) {
  return request({
    url: "/store/conf/create/gear",
    method: "POST",
    data: data,
  });
}

// 档位配置修改
export function UpdateGear(data) {
  return request({
    url: "/store/conf/edit/gear",
    method: "post",
    data: data,
  });
}

// 跨店结算比例查询
export function getCrossStore(data) {
  return request({
    url: "/store/conf/cross/store/query",
    method: "get",
    params: data,
  });
}

// 跨店结算比例新增
export function AddCrossStore(data) {
  return request({
    url: "/store/conf/cross/store/add",
    method: "post",
    data: data,
  });
}

// 跨店结算比例删除
export function DeleteCrossStore(data) {
  return request({
    url: "/store/conf/cross/store/delete",
    method: "get",
    params: data,
  });
}
